import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		contentHeight: 500, //右侧内容总高度
		titleNameHeight:50,//title高度
		searchContentHeight:500,//搜索和table高度
		
		searchHeight:105,//搜索框加按钮高度
		tableHeight:500,//表格高度
		
		
	},
	getters:{
		setSearchHeighObj:(state)=>{
			return {height:`${state.searchContentHeight}px`}
		}
	},
	mutations: {
		getContentHeight(state,data) {
			state.contentHeight = data.height
		},
		getTitleNameHeight(state,data) {
			state.titleNameHeight = data.height
		}, 
		getSearchContentHeight(state,data) {
			state.searchContentHeight = data.height
		},
		getSearchHeight(state,data) {
			state.searchHeight = data.height
		},
		getTableHeight(state,data) {
			state.tableHeight = data.height
		},
	}
})
export default store